package nettyTest;

import java.io.FileInputStream;
import java.security.KeyStore;

public class ExportPrivateKey {

    public static void main(String[] args) throws Exception {
        char[] password = "123456".toCharArray();
        FileInputStream fis = new FileInputStream("E:\\ca\\test.keystore");
        KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
        ks.load(fis, password);
        KeyStore.PrivateKeyEntry pkEntry = (KeyStore.PrivateKeyEntry) ks.getEntry("backend", new KeyStore.PasswordProtection(password));

        System.out.println(pkEntry.getPrivateKey());

    }
}
